﻿#pragma once
using namespace Platform;
using namespace Windows::Foundation::Collections;

namespace SpellCheckerWrapperComponent
{
	public ref class SpellingCheckResults sealed
	{
	private:
		bool _IsCorrect;
		IVector<String^>^ _Suggestions;
		String^ _ReplacementIfAny;
	public:
		property bool IsCorrect
		{
			bool get() { return _IsCorrect; }
			void set(bool isCorrect) { _IsCorrect = isCorrect; }
		}
		property IVector<String^>^ Suggestions
		{
			IVector<String^>^ get() { return _Suggestions; }
			void set(IVector<String^>^ errors) { _Suggestions = errors; }
		}
		property String^ ReplacementIfAny
		{
			String^ get() { return _ReplacementIfAny; }
			void set(String^ replacement) { _ReplacementIfAny = replacement; }
		}
	};

    public ref class SpellChecker sealed
    {
	private:
		IVector<String^>^ _Errors;
		size_t _LastValue;
	public:
		property IVector<String^>^ Errors
		{
			IVector<String^>^ get() { return _Errors; }
			void set(IVector<String^>^ errors) { _Errors = errors; }
		}

		property size_t LastValue
		{
			size_t get() { return _LastValue; }
			void set(size_t lastValue) { _LastValue = lastValue; }
		}
	public:
		SpellingCheckResults^ CheckWordSpelling(String^ word, String^ languageTag);
		IVector<String^>^ GetSupportedLanguages();
	public:
        SpellChecker();
    };
}